<!DOCTYPE html>
<html lang="en" xmlns:th="http://www.w3.org/1999/xhtml">
<meta charset="utf-8">
<head>
	<meta charset="utf-8">
	<meta name="viewport" content="width=device-width, initial-scale=1.0">
	<meta name="renderer" content="webkit">
	<title>SLSystem</title>
	<meta name="keywords" content="面向学习型的开源框架，简洁高效，杜绝过渡封装，展现技术本质本质">
	<meta name="description" content="面向学习型的开源框架，简洁高效，杜绝过渡封装，展现技术本质本质">
	<link rel="shortcut icon" href="favicon.ico">
	<link href="/css/bootstrap.min.css?v=3.3.6" rel="stylesheet">
	<link href="/css/font-awesome.min.css?v=4.4.0" rel="stylesheet">
	<link href="/css/plugins/toastr/toastr.min.css" rel="stylesheet">
	<link href="/css/animate.css" rel="stylesheet">
	<link href="/css/style.css?v=4.1.0" rel="stylesheet">
	<link href="//f.51240.com/img/css/style.css?v=57941872c68a0126_15707" rel="stylesheet" type="text/css" />

</head>
<body class="gray-bg">
<div class="wrapper wrapper-content ">
	<h4 class="totaltitle">请选择十种您所偏好的食物：</h4>
	<div class="col-sm-12">
		<table id="kaluli_table" width="98%" style="max-width:720px;" align="center" class="ju_zhong">
			<form id="this_form" name="this_form" th:href="@{/foodpre/save}">
				<tr>
					<td height="30">肉禽类</td>
					<td>蛋类</td>
					<td>水产类</td>
					<td>蔬菜类</td>
					<td>米面豆</td>
				</tr>
				<tr>
					<td>
<!--						<select name="bodyType" id="bodyType" data-live-search="true"-->
<!--								class="form-control chosen-select selectpicker" tabindex="2" required>-->
<!--							<option th:each="bodytype:${bodytypes}"-->
<!--									th:value="${bodytype.code}"-->
<!--									th:text="${bodytype.code}+'&#45;&#45;'+${bodytype.CodeName}"-->
<!--									th:selected="${healthinfo.bodyType==bodytype.code}">-->
<!--							</option>-->
<!--						</select>-->
						<select class="all_srk_1" onChange="cal_volume1(this.form)" name="kcal_item1">
							<option value="0" selected>请选择</option>
							<option th:each="foodA:${foodAs}"
									th:value="${foodA.code}"
									th:text="${foodA.CodeName}">
							</option>
<!--							<option value="0" selected>请选择</option>-->
<!--							<option value="263">白饭1碗</option>-->
<!--							<option value="360">米粉(干)100g</option>-->
<!--							<option value="372">蛋面(干)100g</option>-->
<!--							<option value="203">河粉100g</option>-->
<!--							<option value="368">通心粉(干)100g</option>-->
<!--							<option value="363">意大利粉100g</option>-->
<!--							<option value="250">公仔面1个</option>-->
<!--							<option value="404">伊面1个</option>-->
<!--							<option value="100">乌冬100g</option>-->
<!--							<option value="356">上海面100g</option>-->
<!--							<option value="330">面线100g</option>-->
<!--							<option value="350">粉丝100g</option>-->
<!--							<option value="389">燕麦片100g</option>-->
						</select>
					</td>
					<td>
						<select class="all_srk_1" onChange="cal_volume2(this.form)" name="kcal_item2">
							<option value="0" selected>请选择</option>
							<option th:each="foodB:${foodBs}"
									th:value="${foodB.code}"
									th:text="${foodB.CodeName}">
							</option>
<!--							<option value="114">牛肉100g</option>-->
<!--							<option value="450">牛肉(净瘦肉)100g</option>-->
<!--							<option value="260">牛肉(半肥瘦)100g</option>-->
<!--							<option value="300">汉堡牛扒100g</option>-->
<!--							<option value="240">咸牛肉100g</option>-->
<!--							<option value="100">鸡肉100g</option>-->
<!--							<option value="195">烧鸡100g</option>-->
<!--							<option value="198">白切鸡100g</option>-->
<!--							<option value="123">猪肉100g</option>-->
<!--							<option value="451">煎猪扒100g</option>-->
<!--							<option value="317">烧猪脾100g</option>-->
<!--							<option value="326">香肠100g</option>-->
<!--							<option value="674">煎烟肉100g</option>-->
<!--							<option value="389">火腿100g</option>-->
<!--							<option value="335">午餐肉100g</option>-->
<!--							<option value="355">烧羊脾100g</option>-->
						</select>
					</td>
					<td>
						<select class="all_srk_1" onChange="cal_volume3(this.form)" name="kcal_item3">
							<option value="0" selected>请选择</option>
							<option th:each="foodC:${foodCs}"
									th:value="${foodC.code}"
									th:text="${foodC.CodeName}">
							</option>
<!--							<option value="114">牛肉100g</option>-->
<!--							<option value="450">牛肉(净瘦肉)100g</option>-->
<!--							<option value="260">牛肉(半肥瘦)100g</option>-->
<!--							<option value="300">汉堡牛扒100g</option>-->
<!--							<option value="240">咸牛肉100g</option>-->
<!--							<option value="100">鸡肉100g</option>-->
<!--							<option value="195">烧鸡100g</option>-->
<!--							<option value="198">白切鸡100g</option>-->
<!--							<option value="123">猪肉100g</option>-->
<!--							<option value="451">煎猪扒100g</option>-->
<!--							<option value="317">烧猪脾100g</option>-->
<!--							<option value="326">香肠100g</option>-->
<!--							<option value="674">煎烟肉100g</option>-->
<!--							<option value="389">火腿100g</option>-->
<!--							<option value="335">午餐肉100g</option>-->
<!--							<option value="355">烧羊脾100g</option>-->
						</select>
					</td>
					<td>
						<select class="all_srk_1" onChange="cal_volume4(this.form)" name="kcal_item4">
							<option value="0" selected>请选择</option>
							<option th:each="foodD:${foodDs}"
									th:value="${foodD.code}"
									th:text="${foodD.CodeName}">
							</option>
<!--							<option value="114">牛肉100g</option>-->
<!--							<option value="450">牛肉(净瘦肉)100g</option>-->
<!--							<option value="260">牛肉(半肥瘦)100g</option>-->
<!--							<option value="300">汉堡牛扒100g</option>-->
<!--							<option value="240">咸牛肉100g</option>-->
<!--							<option value="100">鸡肉100g</option>-->
<!--							<option value="195">烧鸡100g</option>-->
<!--							<option value="198">白切鸡100g</option>-->
<!--							<option value="123">猪肉100g</option>-->
<!--							<option value="451">煎猪扒100g</option>-->
<!--							<option value="317">烧猪脾100g</option>-->
<!--							<option value="326">香肠100g</option>-->
<!--							<option value="674">煎烟肉100g</option>-->
<!--							<option value="389">火腿100g</option>-->
<!--							<option value="335">午餐肉100g</option>-->
<!--							<option value="355">烧羊脾100g</option>-->
						</select>
					</td>
					<td>
						<select class="all_srk_1" onChange="cal_volume5(this.form)" name="kcal_item5">
							<option value="0" selected>请选择</option>
							<option th:each="foodE:${foodEs}"
									th:value="${foodE.code}"
									th:text="${foodE.CodeName}">
							</option>
<!--							<option value="0" selected>请选择</option>-->
<!--							<option value="114">牛肉100g</option>-->
<!--							<option value="450">牛肉(净瘦肉)100g</option>-->
<!--							<option value="260">牛肉(半肥瘦)100g</option>-->
<!--							<option value="300">汉堡牛扒100g</option>-->
<!--							<option value="240">咸牛肉100g</option>-->
<!--							<option value="100">鸡肉100g</option>-->
<!--							<option value="195">烧鸡100g</option>-->
<!--							<option value="198">白切鸡100g</option>-->
<!--							<option value="123">猪肉100g</option>-->
<!--							<option value="451">煎猪扒100g</option>-->
<!--							<option value="317">烧猪脾100g</option>-->
<!--							<option value="326">香肠100g</option>-->
<!--							<option value="674">煎烟肉100g</option>-->
<!--							<option value="389">火腿100g</option>-->
<!--							<option value="335">午餐肉100g</option>-->
<!--							<option value="355">烧羊脾100g</option>-->
						</select>
					</td>
				</tr>
				<tr>
					<td height="50" colspan="4"></td>
				</tr>
				<tr>
					<td colspan="4"><select style="max-width:500px;width:98%;" size="5" name="selected_display"><option value="selected">你选择的食物列表:</option></select></td>
				</tr>
				<td colspan="4" height="30" class="shuru_div">
					<input name="button" type="button" id="reset" onClick="resetall();" value="重新选择" class="all_an_1" />
					<input name="button" type="button" id="save" onClick="saveall();"value="保存偏好" class="all_an_1" />
				</td>
			</form>
		</table>
	</div>
</div>
<script>cache_sjs="20031906";sj_jie_mian="1";</script>
<script th:src="@{/js/data/data.js}"></script>
<script th:src="@{/js/kaluli/js.js}"></script>
<script th:src="@{/css/img/js/js.js}"></script>
<!-- 全局js -->
<script src="/js/jquery.min.js?v=2.1.4" th:src="@{/js/jquery.min.js?v=2.1.4}"></script>
<script src="/js/bootstrap.min.js?v=3.3.6" th:src="@{/js/bootstrap.min.js?v=3.3.6}"></script>
<script src="/js/bootstrap-select.js?v=3.3.6" th:src="@{/js/bootstrap-select.js?v1.6.3}"></script>
<script type="text/javascript" src="/js/plugins/layer/laydate/laydate.js"></script>

<!-- jQuery Validation plugin javascript-->
<script src="/js/ajax-util.js"></script>
<script src="/js/plugins/validate/jquery.validate.min.js" th:src="@{/js/plugins/validate/jquery.validate.min.js}"></script>
<script src="/js/plugins/validate/messages_zh.min.js" th:src="@{/js/plugins/validate/messages_zh.min.js}"></script>
<script src="/js/plugins/layer/layer.min.js" th:src="@{/js/plugins/layer/layer.min.js}"></script>
<script type="text/javascript">
	function saveall(){
		$.ajax({
			data: $('#this_form').serialize(),
			type: "POST",
			datatype: "json",
			url: "/foodpre/save",
			success: function (r) {
				if (r.code == 0) {
					layer.msg("保存成功");
				} else {
					layer.msg(r.msg);
				}
			}
		});
	}
</script>

</body>
</html>